<?php
abstract class Commodity
{
    private $name;              //名字
    private $price;             //价格
    private $inventory;         //库存

    abstract protected function showInfo();

    function __construct()
    {

    }
    function __destruct()
    {
        // TODO: Implement __destruct() method.
    }

    public function getName()
    {
        return $this->name;
    }


    public function setName($name)
    {
        $this->name = $name;
    }

    public function getInventory()
    {
        return $this->inventory;
    }

    public function getPrice()
    {
        return $this->price;
    }

    public function setInventory($inventory)
    {
        $this->inventory = $inventory;
    }

    public function setPrice($price)
    {
        $this->price = $price;
    }

}